package api

import (
	"ginApi/app/common"
	"ginApi/exception"
	"ginApi/facade/protocol/req"
	"github.com/gin-gonic/gin"
	"net/http"
)

func ExampleApi(c *gin.Context) common.ErrorText {

	var request req.ExampleUserReq
	err := c.ShouldBind(&request)
	if err != nil {
		return common.BuildError(exception.ParameterError, err)
	}
	c.JSON(http.StatusOK, request)
	return nil
}
